package ai.fabu.dataplatform.service;

import ai.fabu.dataplatform.*;
import ai.fabu.dataplatform.bean.framedata.GetBinData;
import ai.fabu.dataplatform.bean.util.IndexData;
import ai.fabu.dataplatform.bean.util.Pair;
import ai.fabu.dataplatform.bean.metadata.GetMetadata;
import ai.fabu.dataplatform.help.Result;

import javax.validation.constraints.NotNull;
import java.util.List;

public interface ApiService {
    //save
    Result<Long> saveMetadata(@NotNull IndexData indexData, @NotNull Class<?> T, int type, @NotNull List<Pair<String, byte[]>> metadatasList);
    Result<Long> saveMetadata(@NotNull IndexData indexData, @NotNull Class<?> T, int type, @NotNull Pair<String, byte[]> ... metadatas);

    // get
    Result<List<GetMetadata>> getMetadataWithoutVerify(@NotNull IndexData indexData, int type, @NotNull String ... keys);
    Result<List<GetMetadata>> getMetadataWithoutVerify(@NotNull IndexData indexData, int type, @NotNull List<String> keyList);

    Result<List<GetMetadata>> getMetadata(@NotNull IndexData indexData, int type, @NotNull String ... keys);
    Result<List<GetMetadata>> getMetadata(@NotNull IndexData indexData, int type, @NotNull List<String> keyList);
    Result<List<IndexData>> getIndex(@NotNull IndexData indexData, int type);
    

    // todo
    Result<List<GetBinData>> getBinData(@NotNull IndexData indexData);

}
